<template>
	<view class="">
		<u-sticky bgColor="#ffffff">
			<u-tabs :list="list1" @change="handleChange" :inactiveStyle="{
					'white-space':'nowrap',
					'font-size':'28rpx',
					'color':'#666666'
				}" :activeStyle="{
					'white-space':'nowrap',
					'font-size':'28rpx',
					'color': 'black'
				}" lineColor="#f74062" lineWidth="30" size="mini" :scrollable="false"></u-tabs>
		</u-sticky>
		<view class="app-pages">
			<view class="cell" v-if="tabsIndex == 0">
				<view class="cell-item" v-for="item in 5" :key="item">
					<u--image :showLoading="true" src="https://p.qqan.com/up/2022-6/16543432412777143.jpg"
					 width="325rpx" 
					 height="300rpx"></u--image>
					<view class="content">
						<view class="title">鲜肉粽 1200g</view>
						<view class="tips">
							<view class="price">￥448</view>
							<view class="">月售 446</view>
						</view>
					</view>
				</view>
			</view>
			
			
			<view class="cell" v-if="tabsIndex == 1">
				<view class="cell-item" v-for="item in 5" :key="item">
					<u--image :showLoading="true" src="https://p.qqan.com/up/2022-6/16543432412777143.jpg"
					 width="325rpx" 
					 height="300rpx"></u--image>
					<view class="content">
						<view class="title">复兴路办公区水吧</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				tabsIndex: 0,
				list1: [{
						name: '收藏商品'
					},
					{
						name: '收藏店铺'
					}
				]
			}
		},
		methods: {
			handleChange(options) {
				this.tabsIndex = options.index
				console.log('test:', options)
			}
		}
	}
</script>
<style lang="scss" scoped>
	.cell{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		.cell-item{
			box-shadow: 0 0 4rpx #cccccc;
			margin-top: 30rpx;
			overflow: hidden;
			border-radius: 8rpx;
			.content{
				padding: 20rpx 10rpx;
				.tips{
					display: flex;
					justify-content: space-between;
					align-items: flex-end;
					font-size: 20rpx;
					color: #cccccc;
					margin-top: 20rpx;
					.price{
						color: red;
						font-size: 28rpx;
					}
				}
				.title{
					font-weight: bold;
				}
			}
		}
	}
</style>
